import { DEFAULT_LAYOUT } from "../base";
import type { AppRouteRecordRaw } from "../types";

const WORKFLOW: AppRouteRecordRaw = {
  path: "/workflow",
  name: "workflow",
  component: DEFAULT_LAYOUT,
  meta: {
    locale: "流程管理",
    icon: "icon-storage",
    requiresAuth: true,
    order: 5,
  },
  children: [
    {
      path: "viewDesigner",
      name: "ViewDesigner",
      component: () => import("@/views/workflow/viewDesigner.vue"),
      meta: {
        locale: "视图设计",
        requiresAuth: true,
        roles: ["*"],
      },
    },
    {
      path: "designer",
      name: "WorkflowDesigner",
      component: () => import("@/views/workflow/designer.vue"),
      meta: {
        locale: "流程设计",
        requiresAuth: true,
        fullscreen: true,
        roles: ["*"],
      },
    },
    {
      path: "viewDesignerCreate",
      name: "ViewDesignerCreate",
      component: () => import("@/views/workflow/viewDesignerCreate.vue"),
      meta: {
        locale: "视图设计创建",
        requiresAuth: true,
        roles: ["*"],
      },
    },
  ],
};

export default WORKFLOW;
